<?php
namespace app\index\controller;
// 指定允许其他域名访问
header('Access-Control-Allow-Origin:*');
// 响应类型
header('Access-Control-Allow-Methods:*');
// 响应头设置
header('Access-Control-Allow-Headers:x-requested-with,content-type');
class Index
{
    public function index()
    {
        $status = 0;
        $result = '失败是不能的！';
        $data = [];
        return ['status'=>$status, 'message'=>$result, 'data'=>$data];
    }
}
